import { findHeadCategory } from '@/api/home'

export default {
  namespaced: true,
  state: {
    cateList: []
  },

  mutations: {
    setList (state, payload) {
      state.cateList = payload
    }
  },
  actions: {
    async asyncsetList ({ commit }) {
      const { result } = await findHeadCategory()
      console.log('获取的数据', result)
      commit('setList', result)
    }
  }
}
